import 'package:flutter/material.dart';

class DetailPage extends StatelessWidget {
  const DetailPage({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('detailPage'),
        ),
        body: Center(
          child: Column(
            children: [
              const Text('detailPage'),
              ElevatedButton(
                  onPressed: () {
                    Navigator.pop(context);
                  },
                  child: const Text('返回')),
              ElevatedButton(
                  onPressed: () {
                    showDialog(
                        context: context,
                        builder: (context) {
                          return AlertDialog(
                            title: const Text('弹窗标题'),
                            content: const Text('弹窗内容'),
                            actions: [
                              TextButton(
                                  onPressed: () {
                                    Navigator.pop(context);
                                  },
                                  child: const Text('确定'))
                            ],
                          );
                        });
                  },
                  child: const Text('开启弹窗'))
            ],
          ),
        ),
      ),
    );
  }
}
